-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve diagnostics for lifetime after &mut
#73595
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthewjasper (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @estebank |
Should I squash that commit? EDIT: ouch, whitespace. :( |
d7006a4
to
772058c
Compare
@SNCPlay42 @ayazhafiz This is a triage bump. |
@Muirrum should this be labeled/tagged for higher visibility? re the issue this commit fixes is a p-high |
@estebank this is waiting for your review |
This comment has been minimized.
This comment has been minimized.
00fe792
to
3c13206
Compare
3c13206
to
4de9a53
Compare
Thank you! I've squashed the commits here into one as well. @bors r+ |
📌 Commit 4de9a53 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
If, when parsing a borrow pointee type, we see a lifetime after
mut
, suggest placing the lifetime beforemut
and eat the lifetime to avoid a large number of unhelpful diagnostics.There are some subtleties to avoid false positives in cases like
&mut 'a + Trait
, where&mut ('a + Trait)
is a better suggestion.fixes #73568